<template>
  <div class="query-test">
    <ul>
      <li v-for="(item, index) in list" :key="index">
        {{ item }}
      </li>
    </ul>
  </div>
</template>

<script>
import api from "@/api";
import { defineComponent } from "vue";
export default defineComponent({
  async setup() {
    let { code, list } = await api.queryData();
    if (+code !== 0) list = [];
    return {
      list,
    };
  },
});
</script>